package Job202213;

public class Job2 {
    public static void main(String[] args) {
        //2. 判断字符出现次数
        String s="javadksjjava javooojavadddjava";
       int n=s.split("java").length>0?s.split("java").length-1:0;
       if(s.endsWith("java")){
           n+=1;
       }
       System.out.println(n);
    }
}
